package com.bdqn.oa.dao;



import com.bdqn.oa.entity.Vote;

import java.sql.SQLException;
import java.util.List;

/**
 * @author qiaolu
 * @date 2022/7/20 15:26
 */
public interface VoteDao {
    /**
     * 通过Voteid查询
     * @return
     * @throws SQLException
     */
    public Vote getbyidVote(Integer VoteId)throws SQLException;

    /**
     * 查询全部投票项目
     * @return
     * @throws SQLException
     */
    public List<Vote> listAllVote()throws SQLException;

    /**
     * 通过匿名和不匿名查询
     * @param number
     * @return
     * @throws SQLException
     */
    public List<Vote>listbyAnonymous(Integer number)throws SQLException;
    /**
     * 添加选项投票
     * @return
     * @throws SQLException
     */
    public int saveVote(Vote vote)throws SQLException;

    /**
     * 修改投票选项
     * @return
     * @throws SQLException
     */
    public int updateVote(Vote vote)throws SQLException;

}
